import request from '@/utils/request'
/**
 * 得到企业列表的接口
 * @param {Object} params {需要查询的数据}
 * @returns
 */
export const getParkEnterpriceListApi = (params) => {
  return request({
    url: '/park/enterprise',
    method: 'GET',
    params: params
  })
}
/**
 * 得到企业所属行业的列表
 * @returns
 */
export const getEnterpriceIndustryList = () => {
  return request({
    url: `/park/industry`,
    method: 'GET'
  })
}
/**
 * 添加企业的接口
 * @param {Object} data {8项上传参数}
 * @returns
 */
export const postParkEnterpriseApi = (data) => {
  return request({
    url: '/park/enterprise',
    method: 'POST',
    data
  })
}
/**
 * 编辑企业的接口
 * @param {Object} data {9项参数，比添加企业多一项企业id}
 * @returns
 */
export const editParkEnterpriseApi = (data) => {
  return request({
    url: '/park/enterprise',
    method: 'put',
    data
  })
}
/**
 * 得到企业信息的接口
 * @param {String} id 企业id
 * @returns
 */
export const getParkEnterpriceInfoApi = (id) => {
  return request({
    url: `/park/enterprise/${id}`,
    method: 'GET'
  })
}
/**
 * 完成删除企业的接口
 * @param {String} id 要删除的企业id
 * @returns
 */
export const deleteParkEnterpriceApi = (id) => {
  return request({
    url: `/park/enterprise/${id}`,
    method: 'DELETE'
  })
}
/**
 * 添加/续租企业的租赁合同的Api
 * @param {Object} data {7项参数}
 * @returns
 */
export const addEnterpriceRentContractApi = (data) => {
  return request({
    url: '/park/enterprise/rent',
    method: 'POST',
    data
  })
}
